import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { InterviewModule } from './interview/interview.module';

const TYPE_ORM_MODULE = TypeOrmModule.forRoot({
  type: 'mysql',
  host: '127.0.0.1',
  port: 3306,
  username: 'root',
  password: 'A887563$',
  database: 'micro_app',
  autoLoadEntities: true,
  synchronize: true,
});

@Module({
  imports: [TYPE_ORM_MODULE, InterviewModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
